package com.llho.core.bo.impl;

import java.util.List;

import com.llho.core.bo.ImageBo;
import com.llho.core.dao.ImageDAO;
import com.llho.core.domain.Image;
import com.llho.core.domain.Product;

public class ImageBoImpl implements ImageBo {

	private ImageDAO imageDAO;
	public void setImageDAO(ImageDAO imageDAO){
		this.imageDAO = imageDAO;
	}
	
	@Override
	public Image getById(Long id) {
		return imageDAO.getById(id);
	}

	@Override
	public List<Image> getAll() {
		return imageDAO.getAll(); 
	}

	@Override
	public List<Image> getByProduct(Product entity) {
		return imageDAO.getByProduct(entity);
	}

	@Override
	public void addNew(Image entity) {
		imageDAO.addNew(entity);
	}

	@Override
	public void update(Image entity) {
		imageDAO.update(entity);
	}

	@Override
	public void delete(Image entity) {
		imageDAO.delete(entity);
	}

}
